package com.lagou.stage02;

public class CallService extends ServiceAbstract implements CallServiceInterface{
    private double duration;
    private int num_message;
    private double monthly_charges;

    public CallService(double duration, int num_message, double monthly_charges) {
        this.duration = duration;
        this.num_message = num_message;
        this.monthly_charges = monthly_charges;
    }

    public double getMonthlyCharges() {
        return monthly_charges;
    }

    public void setMonthlyCharges(double monthly_charges) {
        this.monthly_charges = monthly_charges;
    }

    @Override
    public void show() {
        System.out.println("当前套餐包含通话时长：" + duration + "分钟，短信条数：" + num_message + "条，每月资费：" + monthly_charges + "元。");
    }

    @Override
    public void callServiceAction(double duration, String type) {
        System.out.println("已经使用" + type + "通话了" + duration + "分钟了。");

    }
}
